// 引入 axios 的实例
import request from '@/utils/request'

// 封装注册接口
export const register = (obj) => {
  return request.post('/user/register', {
    username: obj.username,
    password: obj.password,
  })
}

// 封装登录接口
export const login = (obj) => {
  return request.post('/user/login', obj)
}

// 获取用户信息
export const getUserInfo = () => {
  return request.get('/user/currentUser')
}
